home *** CD-ROM | disk | FTP | other *** search
/ La Bible Des... Jeux / La Bible des... Jeux.iso / Les Sharewares / Educatifs / A Panda is for Life... / Musical Panda / Musical Panda.6 / 00119_Main Movie Script.ls < prev    next >
Encoding:
Text File  |  1995-12-03  |  10.2 KB  |  326 lines

  1. on startMovie
  2.   global oldSoundLevel, oldColorDepth
  3.   set the randomSeed to the ticks
  4.   set oldSoundLevel to the soundLevel
  5.   set oldColorDepth to the colorDepth
  6.   set the soundLevel to 7
  7.   if the colorDepth <> 8 then
  8.     set the colorDepth to 8
  9.   end if
  10.   cursor(200)
  11.   set whichCursor to the number of cast "hand"
  12.   cursor([whichCursor, whichCursor + 1])
  13.   if the quickTimePresent = 0 then
  14.     go("bail")
  15.   end if
  16. end
  17.  
  18. on stopMovie
  19.   global oldSoundLevel, oldColorDepth
  20.   cursor(0)
  21.   set the soundLevel to oldSoundLevel
  22.   set the colorDepth to oldColorDepth
  23.   repeat with whichChannel = 1 to 48
  24.     puppetSprite(whichChannel, 0)
  25.   end repeat
  26.   clearGlobals()
  27. end
  28.  
  29. on goodBye
  30.   go(25)
  31. end
  32.  
  33. on checkRollOvers
  34.   global CONTROLS
  35.   if rollOver(22) then
  36.     set the visible of sprite CONTROLS to 1
  37.     set the visible of sprite (CONTROLS + 1) to 0
  38.     set the castNum of sprite CONTROLS to the number of cast "lccw1"
  39.   else
  40.     if rollOver(23) then
  41.       set the visible of sprite CONTROLS to 1
  42.       set the visible of sprite (CONTROLS + 1) to 0
  43.       set the castNum of sprite CONTROLS to the number of cast "lcw1"
  44.     else
  45.       if rollOver(24) then
  46.         set the visible of sprite (CONTROLS + 1) to 1
  47.         set the visible of sprite CONTROLS to 0
  48.         set the castNum of sprite (CONTROLS + 1) to the number of cast "rccw1"
  49.       else
  50.         if rollOver(25) then
  51.           set the visible of sprite (CONTROLS + 1) to 1
  52.           set the visible of sprite CONTROLS to 0
  53.           set the castNum of sprite (CONTROLS + 1) to the number of cast "rcw1"
  54.         else
  55.           set the visible of sprite CONTROLS to 0
  56.           set the visible of sprite (CONTROLS + 1) to 0
  57.         end if
  58.       end if
  59.     end if
  60.   end if
  61. end
  62.  
  63. on createBackgroundFlake
  64.   global flakeList
  65.   if count(flakeList) >= 10 then
  66.     beep()
  67.   else
  68.     add(flakeList, birth(script "SnowflakePB", count(flakeList) + 1))
  69.   end if
  70. end
  71.  
  72. on createForegroundFlake
  73.   global flakeList
  74.   if count(flakeList) >= 10 then
  75.     beep()
  76.   else
  77.     add(flakeList, birth(script "SnowflakePF", count(flakeList) + 1))
  78.   end if
  79. end
  80.  
  81. on animateSnowFlakes
  82.   global flakeList, MUSIC_CHANNEL
  83.   if (count(flakeList) > 0) and (the movieRate of sprite MUSIC_CHANNEL = 1) then
  84.     repeat with t = 1 to count(flakeList)
  85.       animateFlake(getAt(flakeList, t))
  86.     end repeat
  87.   end if
  88. end
  89.  
  90. on shuffleSnowFlakes
  91.   global flakeList, MUSIC_CHANNEL
  92.   if count(flakeList) > 0 then
  93.     repeat with t = 1 to count(flakeList)
  94.       swapFlake(getAt(flakeList, t))
  95.     end repeat
  96.   end if
  97. end
  98.  
  99. on charmFlakes
  100.   global flakeList
  101.   if count(flakeList) > 0 then
  102.     repeat with t = 1 to count(flakeList)
  103.       charmFlake(getAt(flakeList, t))
  104.     end repeat
  105.   end if
  106. end
  107.  
  108. on increaseVolume
  109.   global MUSIC_CHANNEL, MUSICBOX, CONTROLS, currentVolume, currentTune, cursor
  110.   set theCast to the number of cast "lcw1"
  111.   set whichSprite to CONTROLS
  112.   set whichCursor to the number of cast "fist"
  113.   cursor([whichCursor, whichCursor + 1])
  114.   set the visible of sprite whichSprite to 1
  115.   if the movieRate of sprite MUSIC_CHANNEL = 0 then
  116.     set the movieRate of sprite MUSIC_CHANNEL to 1
  117.     set the castNum of sprite MUSIC_CHANNEL to currentTune + MUSICBOX
  118.     puppetSound("Click")
  119.   end if
  120.   if currentVolume = 250 then
  121.     flashNose()
  122.   else
  123.     repeat while the stillDown
  124.       set currentVolume to currentVolume + 25
  125.       if currentVolume >= 250 then
  126.         set currentVolume to 250
  127.         set the volume of sprite MUSIC_CHANNEL to currentVolume
  128.         exit repeat
  129.       end if
  130.       set the volume of sprite MUSIC_CHANNEL to currentVolume
  131.       repeat with ix = 1 to 1000
  132.         nothing()
  133.       end repeat
  134.       set the castNum of sprite whichSprite to the castNum of sprite whichSprite + 1
  135.       if the castNum of sprite whichSprite > (theCast + 3) then
  136.         set the castNum of sprite whichSprite to theCast
  137.       end if
  138.       updateStage()
  139.     end repeat
  140.   end if
  141.   set the visible of sprite whichSprite to 0
  142.   set whichCursor to the number of cast "hand"
  143.   cursor([whichCursor, whichCursor + 1])
  144. end
  145.  
  146. on decreaseVolume
  147.   global MUSIC_CHANNEL, CONTROLS, currentVolume
  148.   set theCast to the number of cast "lccw1"
  149.   set whichSprite to CONTROLS
  150.   set whichCursor to the number of cast "fist"
  151.   cursor([whichCursor, whichCursor + 1])
  152.   set the visible of sprite whichSprite to 1
  153.   if the movieRate of sprite MUSIC_CHANNEL = 0 then
  154.     flashNose()
  155.   else
  156.     repeat while the stillDown
  157.       set currentVolume to currentVolume - 25
  158.       if currentVolume <= 0 then
  159.         set currentVolume to 0
  160.         set the volume of sprite MUSIC_CHANNEL to currentVolume
  161.         set the movieRate of sprite MUSIC_CHANNEL to 0
  162.         puppetSound("Click")
  163.         exit repeat
  164.       end if
  165.       set the volume of sprite MUSIC_CHANNEL to currentVolume
  166.       repeat with ix = 1 to 1000
  167.         nothing()
  168.       end repeat
  169.       set the castNum of sprite whichSprite to the castNum of sprite whichSprite + 1
  170.       if the castNum of sprite whichSprite > (theCast + 3) then
  171.         set the castNum of sprite whichSprite to theCast
  172.       end if
  173.       updateStage()
  174.     end repeat
  175.   end if
  176.   set the visible of sprite whichSprite to 0
  177.   set whichCursor to the number of cast "hand"
  178.   cursor([whichCursor, whichCursor + 1])
  179. end
  180.  
  181. on nextTune
  182.   global MUSICBOX, MUSIC_CHANNEL, CONTROLS, INDICATOR, currentTune, currentVolume
  183.   set whichCursor to the number of cast "fist"
  184.   cursor([whichCursor, whichCursor + 1])
  185.   if currentTune = 10 then
  186.     flashNose()
  187.   else
  188.     set theCast to the number of cast "rcw1"
  189.     set whichSprite to CONTROLS + 1
  190.     set currentTune to currentTune + 1
  191.     if the movieRate of sprite MUSIC_CHANNEL = 0 then
  192.       flashVolumeKnob()
  193.     else
  194.       set the castNum of sprite MUSIC_CHANNEL to currentTune + MUSICBOX
  195.       set the movieRate of sprite MUSIC_CHANNEL to 1
  196.     end if
  197.     set the castNum of sprite whichSprite to the castNum of sprite whichSprite + 1
  198.     if the castNum of sprite whichSprite > (theCast + 3) then
  199.       set the castNum of sprite whichSprite to theCast
  200.     end if
  201.     puppetSound("Click")
  202.     set the castNum of sprite INDICATOR to the castNum of sprite INDICATOR + 1
  203.     updateStage()
  204.     repeat while the stillDown
  205.       if currentTune < 10 then
  206.         set currentTune to currentTune + 1
  207.         if the movieRate of sprite MUSIC_CHANNEL = 0 then
  208.           flashVolumeKnob()
  209.         else
  210.           set the castNum of sprite MUSIC_CHANNEL to currentTune + MUSICBOX
  211.           set the movieRate of sprite MUSIC_CHANNEL to 1
  212.         end if
  213.         set the castNum of sprite whichSprite to the castNum of sprite whichSprite + 1
  214.         if the castNum of sprite whichSprite > (theCast + 3) then
  215.           set the castNum of sprite whichSprite to theCast
  216.         end if
  217.         puppetSound("Click")
  218.         set the castNum of sprite INDICATOR to the castNum of sprite INDICATOR + 1
  219.         updateStage()
  220.       end if
  221.     end repeat
  222.   end if
  223.   set the volume of sprite MUSIC_CHANNEL to currentVolume
  224.   shuffleSnowFlakes()
  225.   set whichCursor to the number of cast "hand"
  226.   cursor([whichCursor, whichCursor + 1])
  227. end
  228.  
  229. on previousTune
  230.   global MUSICBOX, MUSIC_CHANNEL, CONTROLS, INDICATOR, currentTune, currentVolume
  231.   set whichCursor to the number of cast "fist"
  232.   cursor([whichCursor, whichCursor + 1])
  233.   if currentTune = 1 then
  234.     flashNose()
  235.   else
  236.     set theCast to the number of cast "rccw1"
  237.     set whichSprite to CONTROLS + 1
  238.     set currentTune to currentTune - 1
  239.     if the movieRate of sprite MUSIC_CHANNEL = 0 then
  240.       flashVolumeKnob()
  241.     else
  242.       set the castNum of sprite MUSIC_CHANNEL to currentTune + MUSICBOX
  243.       set the movieRate of sprite MUSIC_CHANNEL to 1
  244.     end if
  245.     set the castNum of sprite whichSprite to the castNum of sprite whichSprite + 1
  246.     if the castNum of sprite whichSprite > (theCast + 3) then
  247.       set the castNum of sprite whichSprite to theCast
  248.     end if
  249.     puppetSound("Click")
  250.     set the castNum of sprite INDICATOR to the castNum of sprite INDICATOR - 1
  251.     updateStage()
  252.     repeat while the stillDown
  253.       if currentTune > 1 then
  254.         set currentTune to currentTune - 1
  255.         if the movieRate of sprite MUSIC_CHANNEL = 0 then
  256.           flashVolumeKnob()
  257.         else
  258.           set the castNum of sprite MUSIC_CHANNEL to currentTune + MUSICBOX
  259.           set the movieRate of sprite MUSIC_CHANNEL to 1
  260.         end if
  261.         set the castNum of sprite whichSprite to the castNum of sprite whichSprite + 1
  262.         if the castNum of sprite whichSprite > (theCast + 3) then
  263.           set the castNum of sprite whichSprite to theCast
  264.         end if
  265.         puppetSound("Click")
  266.         set the castNum of sprite INDICATOR to the castNum of sprite INDICATOR - 1
  267.         updateStage()
  268.       end if
  269.     end repeat
  270.   end if
  271.   set the volume of sprite MUSIC_CHANNEL to currentVolume
  272.   shuffleSnowFlakes()
  273.   set whichCursor to the number of cast "hand"
  274.   cursor([whichCursor, whichCursor + 1])
  275. end
  276.  
  277. on flashNose
  278.   global CONTROLS
  279.   set whichCursor to the number of cast "fist"
  280.   cursor([whichCursor, whichCursor + 1])
  281.   set theCast to the number of cast "nose1"
  282.   set whichSprite to CONTROLS + 2
  283.   set the castNum of sprite whichSprite to theCast
  284.   set the visible of sprite whichSprite to 1
  285.   repeat with ix = 1 to 3
  286.     set the castNum of sprite whichSprite to theCast + ix
  287.     updateStage()
  288.   end repeat
  289.   puppetSound("Buzz")
  290.   repeat with ix = 3 down to 1
  291.     set the castNum of sprite whichSprite to theCast + ix
  292.     updateStage()
  293.   end repeat
  294.   set the visible of sprite whichSprite to 0
  295.   set whichCursor to the number of cast "hand"
  296.   cursor([whichCursor, whichCursor + 1])
  297. end
  298.  
  299. on flashVolumeKnob
  300.   global CONTROLS
  301.   set whichSprite to CONTROLS
  302.   set the castNum of sprite whichSprite to the number of cast "flash"
  303.   repeat with ix = 1 to 4
  304.     set the visible of sprite whichSprite to 1
  305.     updateStage()
  306.     set the visible of sprite whichSprite to 0
  307.     updateStage()
  308.   end repeat
  309. end
  310.  
  311. on flashControls
  312.   global CONTROLS
  313.   set the visible of sprite CONTROLS to 1
  314.   set the visible of sprite (CONTROLS + 1) to 1
  315.   repeat with ix = 1 to 4
  316.     set the castNum of sprite CONTROLS to the number of cast "lcw1"
  317.     set the castNum of sprite (CONTROLS + 1) to the number of cast "rccw1"
  318.     updateStage()
  319.     set the castNum of sprite CONTROLS to the number of cast "lccw1"
  320.     set the castNum of sprite (CONTROLS + 1) to the number of cast "rcw1"
  321.     updateStage()
  322.   end repeat
  323.   set the visible of sprite CONTROLS to 0
  324.   set the visible of sprite (CONTROLS + 1) to 0
  325. end
  326.